{% extends 'amisbase.html' %}
{% block title %}
智能家庭医生
{% endblock %}
{% block amisjson %}
{
  "type": "page",
  "title": "智能家庭医生",
  "body": [
    {
      "type": "flex",
      "className": "p-1",
      "items": [
        {
          "type": "container",
          "body": [
            {
              "id": "u:2978fcc63c06",
              "type": "form",
              "title": "",
              "mode": "normal",
              "dsType": "api",
              "feat": "Insert",
              "body": [
                {
                  "type": "textarea",
                  "label": "",
                  "name": "textarea",
                  "id": "u:9652789981f2",
                  "minRows": 3,
                  "maxRows": 20,
                  "maxLength": 2000,
                  "autoFill": {},
                  "size": "full",
                  "placeholder": "病情自述、医疗咨询、症状速查……",
                  "required": true
                },
                {
                  "type": "input-text",
                  "label": "文本",
                  "name": "csrfmiddlewaretoken",
                  "id": "u:6118338dc742",
                  "visible": false,
                  "value": extractValueFromInput('{% csrf_token %}'),
                  "hidden": false
                }
              ],
              "api": {
                "url": "/mydoctor/api/chattext/",
                "method": "post",
                "requestAdaptor": "",
                "adaptor": "",
                "messages": {},
                "dataType": "form-data"
              },
              "actions": [
                {
                  "type": "flex",
                  "className": "p-1",
                  "items": [
                    {
                      "type": "container",
                      "body": [
                        {
                          "type": "flex",
                          "className": "p-1",
                          "items": [
                            {
                              "type": "container",
                              "body": [
                                {
                                  "type": "button",
                                  "label": "报告识别",
                                  "onEvent": {
                                    "click": {
                                      "actions": [
                                        {
                                          "ignoreError": false,
                                          "actionType": "dialog",
                                          "dialog": {
                                            "type": "dialog",
                                            "title": "报告识别",
                                            "body": [
                                              {
                                                "type": "flex",
                                                "className": "p-1",
                                                "items": [
                                                  {
                                                    "type": "container",
                                                    "body": [
                                                      {
                                                        "id": "u:b3f027fb4fa0",
                                                        "type": "form",
                                                        "title": "",
                                                        "mode": "normal",
                                                        "dsType": "api",
                                                        "feat": "Insert",
                                                        "actions": [
                                                          {
                                                            "type": "button",
                                                            "label": "取消",
                                                            "onEvent": {
                                                              "click": {
                                                                "actions": [
                                                                  {
                                                                    "actionType": "cancel",
                                                                    "componentId": "u:b3f027fb4fa0"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "level": "default",
                                                            "id": "u:dcf8b747720f"
                                                          },
                                                          {
                                                            "type": "button",
                                                            "label": "提交",
                                                            "onEvent": {
                                                              "click": {
                                                                "actions": [
                                                                  {
                                                                    "actionType": "submit",
                                                                    "componentId": "u:b3f027fb4fa0",
                                                                    "outputVar": "submitResult"
                                                                  },
                                                                  {
                                                                    "componentId": "u:7daa8263c93c",
                                                                    "ignoreError": false,
                                                                    "actionType": "setValue",
                                                                    "args": {
                                                                      "value": {
                                                                        "qa_id": "${event.data.submitResult.responseData.qa_id}"
                                                                      }
                                                                    },
                                                                    "expression": "${event.data.submitResult}"
                                                                  },
                                                                  {
                                                                    "actionType": "link",
                                                                    "args": {
                                                                      "link": "./${event.data.submitResult.responseData.qa_id}",
                                                                    },
                                                                    "expression": "${event.data.submitResult}"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "level": "primary",
                                                            "id": "u:fd91d5e5e34b"
                                                          }
                                                        ],
                                                        "resetAfterSubmit": true,
                                                        "body": [
                                                          {
                                                            "name": "image",
                                                            "label": "上传检验报告、诊断报告的照片给智能医生。图片最多上传5张，大小不能超过10MB。",
                                                            "type": "input-image",
                                                            "id": "u:4933286ed8f9",
                                                            "accept": ".jpeg, .jpg, .png, .gif",
                                                            "uploadType": "fileReceptor",
                                                            "proxy": true,
                                                            "multiple": false,
                                                            "hideUploadButton": false,
                                                            "autoUpload": true,
                                                            "multiple": true,
                                                            "maxLength": 5,
                                                            "required": true,
                                                            "receiver": {
                                                              "url": "/mydoctor/api/uploadfile/",
                                                              "method": "post",
                                                              "requestAdaptor": "",
                                                              "adaptor": "",
                                                              "messages": {},
                                                              "dataType": "form-data",
                                                              "data": {
                                                                "&": "$$",
                                                                "csrfmiddlewaretoken": extractValueFromInput('{% csrf_token %}')
                                                              }
                                                            },
                                                            "limit": true,
                                                            "maxSize": 10485760
                                                          },
                                                          {
                                                            "type": "button-group-select",
                                                            "name": "img_type",
                                                            "label": "报告类型",
                                                            "inline": false,
                                                            "options": [
                                                              {
                                                                "label": "检验报告",
                                                                "value": "medical_report_detection"
                                                              },
                                                              {
                                                                "label": "诊断报告",
                                                                "value": "health_report"
                                                              }
                                                            ],
                                                            "id": "u:0b476f8d3688",
                                                            "required": true
                                                          },
                                                          {
                                                            "type": "input-text",
                                                            "label": "csrfmiddlewaretoken",
                                                            "name": "csrfmiddlewaretoken",
                                                            "id": "u:554ed17553d5",
                                                            "visible": false,
                                                            "value": extractValueFromInput('{% csrf_token %}'),
                                                          }
                                                        ],
                                                        "visible": true,
                                                        "wrapWithPanel": true,
                                                        "api": {
                                                          "url": "/mydoctor/api/chatimage/",
                                                          "method": "post",
                                                          "requestAdaptor": "",
                                                          "adaptor": "",
                                                          "messages": {},
                                                          "dataType": "form-data"
                                                        }
                                                      }
                                                    ],
                                                    "size": "xs",
                                                    "style": {
                                                      "position": "static",
                                                      "display": "block",
                                                      "flex": "1 1 auto",
                                                      "flexGrow": 1,
                                                      "flexBasis": "auto"
                                                    },
                                                    "wrapperBody": false,
                                                    "isFixedHeight": false,
                                                    "isFixedWidth": false,
                                                    "id": "u:8cb52c576587"
                                                  }
                                                ],
                                                "style": {
                                                  "position": "relative",
                                                  "inset": "auto",
                                                  "flexWrap": "nowrap",
                                                  "flexDirection": "column"
                                                },
                                                "id": "u:b96e4dfbb412",
                                                "isFixedHeight": false,
                                                "isFixedWidth": false
                                              }
                                            ],
                                            "showCloseButton": true,
                                            "showErrorMsg": true,
                                            "showLoading": true,
                                            "className": "app-popover :AMISCSSWrapper",
                                            "actions": [
                                              {
                                                "type": "button",
                                                "actionType": "cancel",
                                                "label": "取消",
                                                "id": "u:564a4c0b47b7"
                                              },
                                              {
                                                "type": "button",
                                                "actionType": "confirm",
                                                "label": "确认",
                                                "primary": true,
                                                "id": "u:978cbaf66cf2",
                                                "close": true,
                                                "onEvent": {
                                                  "click": {
                                                    "weight": 0,
                                                    "actions": [
                                                      {
                                                        "componentId": "u:8aa4662576cf",
                                                        "ignoreError": false,
                                                        "outputVar": "submitResult",
                                                        "actionType": "submit"
                                                      }
                                                    ]
                                                  }
                                                }
                                              }
                                            ],
                                            "id": "u:0978affce10d",
                                            "closeOnOutside": true,
                                            "closeOnEsc": false,
                                            "draggable": false,
                                            "hideActions": true
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  "id": "u:1a5eac79e46d",
                                  "level": "enhance"
                                }
                              ],
                              "size": "xs",
                              "style": {
                                "position": "static",
                                "display": "block",
                                "flex": "1 1 auto",
                                "flexGrow": 0
                              },
                              "wrapperBody": false,
                              "isFixedHeight": false,
                              "isFixedWidth": false,
                              "id": "u:95ddedda7e3e"
                            },
                            {
                              "type": "container",
                              "body": [
                                {
                                  "type": "button",
                                  "label": "上传病历",
                                  "onEvent": {
                                    "click": {
                                      "actions": [
                                        {
                                          "ignoreError": false,
                                          "actionType": "dialog",
                                          "args": {
                                            "fromCurrentDialog": true
                                          },
                                          "dialog": {
                                            "type": "dialog",
                                            "title": "报告识别",
                                            "body": [
                                              {
                                                "type": "flex",
                                                "className": "p-1",
                                                "items": [
                                                  {
                                                    "type": "container",
                                                    "body": [
                                                      {
                                                        "id": "u:b3f027fb4fa1",
                                                        "type": "form",
                                                        "title": "",
                                                        "mode": "normal",
                                                        "dsType": "api",
                                                        "feat": "Insert",
                                                        "actions": [
                                                          {
                                                            "type": "button",
                                                            "label": "取消",
                                                            "onEvent": {
                                                              "click": {
                                                                "actions": [
                                                                  {
                                                                    "actionType": "cancel",
                                                                    "componentId": "u:b3f027fb4fa1"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "level": "default",
                                                            "id": "u:dcf8b747720f"
                                                          },
                                                          {
                                                            "type": "button",
                                                            "label": "提交",
                                                            "onEvent": {
                                                              "click": {
                                                                "actions": [
                                                                  {
                                                                    "actionType": "submit",
                                                                    "componentId": "u:b3f027fb4fa1"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "level": "primary",
                                                            "id": "u:fd91d5e5e34b"
                                                          }
                                                        ],
                                                        "resetAfterSubmit": true,
                                                        "body": [
                                                          {
                                                            "name": "image",
                                                            "label": "上传病历照片给智能医生。图片最多上传10张，大小不能超过10MB。",
                                                            "type": "input-image",
                                                            "id": "u:4933286ed8f9",
                                                            "accept": ".jpeg, .jpg, .png, .gif",
                                                            "uploadType": "fileReceptor",
                                                            "proxy": true,
                                                            "multiple": false,
                                                            "hideUploadButton": false,
                                                            "autoUpload": true,
                                                            "multiple": true,
                                                            "maxLength": 10,
                                                            "required": true,
                                                            "receiver": {
                                                              "url": "/mydoctor/api/uploadfile/",
                                                              "method": "post",
                                                              "requestAdaptor": "",
                                                              "adaptor": "",
                                                              "messages": {},
                                                              "dataType": "form-data",
                                                              "data": {
                                                                "&": "$$",
                                                                "csrfmiddlewaretoken": extractValueFromInput('{% csrf_token %}')
                                                              }
                                                            },
                                                            "limit": true,
                                                            "maxSize": 10485760
                                                          },
                                                          {
                                                            "type": "input-text",
                                                            "label": "img_type",
                                                            "name": "img_type",
                                                            "id": "u:554ed17553d5",
                                                            "visible": false,
                                                            "value": "case_history",
                                                          },
                                                          {
                                                            "type": "input-text",
                                                            "label": "csrfmiddlewaretoken",
                                                            "name": "csrfmiddlewaretoken",
                                                            "id": "u:554ed17553d5",
                                                            "visible": false,
                                                            "value": extractValueFromInput('{% csrf_token %}'),
                                                          }
                                                        ],
                                                        "visible": true,
                                                        "wrapWithPanel": true,
                                                        "api": {
                                                          "url": "/mydoctor/api/chatimage/",
                                                          "method": "post",
                                                          "requestAdaptor": "",
                                                          "adaptor": "",
                                                          "messages": {},
                                                          "dataType": "form-data"
                                                        }
                                                      }
                                                    ],
                                                    "size": "xs",
                                                    "style": {
                                                      "position": "static",
                                                      "display": "block",
                                                      "flex": "1 1 auto",
                                                      "flexGrow": 1,
                                                      "flexBasis": "auto"
                                                    },
                                                    "wrapperBody": false,
                                                    "isFixedHeight": false,
                                                    "isFixedWidth": false,
                                                    "id": "u:8cb52c576587"
                                                  }
                                                ],
                                                "style": {
                                                  "position": "relative",
                                                  "inset": "auto",
                                                  "flexWrap": "nowrap",
                                                  "flexDirection": "column"
                                                },
                                                "id": "u:b96e4dfbb412",
                                                "isFixedHeight": false,
                                                "isFixedWidth": false
                                              }
                                            ],
                                            "showCloseButton": true,
                                            "showErrorMsg": true,
                                            "showLoading": true,
                                            "className": "app-popover :AMISCSSWrapper",
                                            "actions": [
                                              {
                                                "type": "button",
                                                "actionType": "cancel",
                                                "label": "取消",
                                                "id": "u:564a4c0b47b7"
                                              },
                                              {
                                                "type": "button",
                                                "actionType": "confirm",
                                                "label": "确认",
                                                "primary": true,
                                                "id": "u:978cbaf66cf2",
                                                "close": true,
                                                "onEvent": {
                                                  "click": {
                                                    "weight": 0,
                                                    "actions": [
                                                      {
                                                        "componentId": "u:8aa4662576cf",
                                                        "ignoreError": false,
                                                        "outputVar": "submitResult",
                                                        "actionType": "submit"
                                                      }
                                                    ]
                                                  }
                                                }
                                              }
                                            ],
                                            "id": "u:0978affce10d",
                                            "closeOnOutside": true,
                                            "closeOnEsc": false,
                                            "draggable": false,
                                            "hideActions": true
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  "id": "u:40a3297bfeaa",
                                  "level": "enhance"
                                }
                              ],
                              "size": "xs",
                              "style": {
                                "position": "static",
                                "display": "block",
                                "flex": "1 1 auto",
                                "flexGrow": 0
                              },
                              "wrapperBody": false,
                              "isFixedHeight": false,
                              "isFixedWidth": false,
                              "id": "u:1583cf6ec43a"
                            },
                            {
                              "type": "container",
                              "body": [
                                {
                                  "type": "button",
                                  "label": "药物咨询",
                                  "onEvent": {
                                    "click": {
                                      "actions": [
                                        {
                                          "ignoreError": false,
                                          "actionType": "dialog",
                                          "args": {
                                            "fromCurrentDialog": true
                                          },
                                          "dialog": {
                                            "type": "dialog",
                                            "title": "药物咨询",
                                            "body": [
                                              {
                                                "type": "flex",
                                                "className": "p-1",
                                                "items": [
                                                  {
                                                    "type": "container",
                                                    "body": [
                                                      {
                                                        "id": "u:b3f027fb4fa1",
                                                        "type": "form",
                                                        "title": "",
                                                        "mode": "normal",
                                                        "dsType": "api",
                                                        "feat": "Insert",
                                                        "actions": [
                                                          {
                                                            "type": "button",
                                                            "label": "取消",
                                                            "onEvent": {
                                                              "click": {
                                                                "actions": [
                                                                  {
                                                                    "actionType": "cancel",
                                                                    "componentId": "u:b3f027fb4fa1"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "level": "default",
                                                            "id": "u:dcf8b747720f"
                                                          },
                                                          {
                                                            "type": "button",
                                                            "label": "提交",
                                                            "onEvent": {
                                                              "click": {
                                                                "actions": [
                                                                  {
                                                                    "actionType": "submit",
                                                                    "componentId": "u:b3f027fb4fa1",
                                                                    "outputVar": "submitResult"
                                                                  },    
                                                                  {
                                                                    "componentId": "u:7daa8263c93c",
                                                                    "ignoreError": false,
                                                                    "actionType": "setValue",
                                                                    "args": {
                                                                      "value": {
                                                                        "qa_id": "${event.data.submitResult.responseData.qa_id}"
                                                                      }
                                                                    },
                                                                    "expression": "${event.data.submitResult}"
                                                                  },
                                                                  {
                                                                    "actionType": "link",
                                                                    "args": {
                                                                      "link": "./${event.data.submitResult.responseData.qa_id}",
                                                                    },
                                                                    "expression": "${event.data.submitResult}"
                                                                  }            
                                                                ]
                                                              }
                                                            },
                                                            "level": "primary",
                                                            "id": "u:fd91d5e5e34b"
                                                          }
                                                        ],
                                                        "resetAfterSubmit": true,
                                                        "body": [
                                                          {
                                                            "name": "image",
                                                            "label": "上传药物的外包装或说明书照片给智能医生。图片最多上传2张，大小不能超过10MB。",
                                                            "type": "input-image",
                                                            "id": "u:4933286ed8f9",
                                                            "accept": ".jpeg, .jpg, .png, .gif",
                                                            "uploadType": "fileReceptor",
                                                            "proxy": true,
                                                            "hideUploadButton": false,
                                                            "autoUpload": true,
                                                            "multiple": true,
                                                            "maxLength": 2,
                                                            "required": true,
                                                            "receiver": {
                                                              "url": "/mydoctor/api/uploadfile/",
                                                              "method": "post",
                                                              "requestAdaptor": "",
                                                              "adaptor": "",
                                                              "messages": {},
                                                              "dataType": "form-data",
                                                              "data": {
                                                                "&": "$$",
                                                                "csrfmiddlewaretoken": extractValueFromInput('{% csrf_token %}')
                                                              }
                                                            },
                                                            "limit": true,
                                                            "maxSize": 10485760
                                                          },
                                                          {
                                                            "type": "input-text",
                                                            "label": "img_type",
                                                            "name": "img_type",
                                                            "id": "u:554ed17553d5",
                                                            "visible": false,
                                                            "value": "medicine",
                                                          },
                                                          {
                                                            "type": "input-text",
                                                            "label": "csrfmiddlewaretoken",
                                                            "name": "csrfmiddlewaretoken",
                                                            "id": "u:554ed17553d5",
                                                            "visible": false,
                                                            "value": extractValueFromInput('{% csrf_token %}'),
                                                          }
                                                        ],
                                                        "visible": true,
                                                        "wrapWithPanel": true,
                                                        "api": {
                                                          "url": "/mydoctor/api/chatimage/",
                                                          "method": "post",
                                                          "requestAdaptor": "",
                                                          "adaptor": "",
                                                          "messages": {},
                                                          "dataType": "form-data"
                                                        }
                                                      }
                                                    ],
                                                    "size": "xs",
                                                    "style": {
                                                      "position": "static",
                                                      "display": "block",
                                                      "flex": "1 1 auto",
                                                      "flexGrow": 1,
                                                      "flexBasis": "auto"
                                                    },
                                                    "wrapperBody": false,
                                                    "isFixedHeight": false,
                                                    "isFixedWidth": false,
                                                    "id": "u:8cb52c576587"
                                                  }
                                                ],
                                                "style": {
                                                  "position": "relative",
                                                  "inset": "auto",
                                                  "flexWrap": "nowrap",
                                                  "flexDirection": "column"
                                                },
                                                "id": "u:b96e4dfbb412",
                                                "isFixedHeight": false,
                                                "isFixedWidth": false
                                              }
                                            ],
                                            "showCloseButton": true,
                                            "showErrorMsg": true,
                                            "showLoading": true,
                                            "className": "app-popover :AMISCSSWrapper",
                                            "actions": [
                                              {
                                                "type": "button",
                                                "actionType": "cancel",
                                                "label": "取消",
                                                "id": "u:564a4c0b47b7"
                                              },
                                              {
                                                "type": "button",
                                                "actionType": "confirm",
                                                "label": "确认",
                                                "primary": true,
                                                "id": "u:978cbaf66cf2",
                                                "close": true,
                                                "onEvent": {
                                                  "click": {
                                                    "weight": 0,
                                                    "actions": [
                                                      {
                                                        "componentId": "u:8aa4662576cf",
                                                        "ignoreError": false,
                                                        "outputVar": "submitResult",
                                                        "actionType": "submit"
                                                      }
                                                    ]
                                                  }
                                                }
                                              }
                                            ],
                                            "id": "u:0978affce10d",
                                            "closeOnOutside": true,
                                            "closeOnEsc": false,
                                            "draggable": false,
                                            "hideActions": true
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  "id": "u:1b77076dd811",
                                  "level": "enhance"
                                }
                              ],
                              "size": "xs",
                              "style": {
                                "position": "static",
                                "display": "block",
                                "flex": "1 1 auto",
                                "flexGrow": 0
                              },
                              "wrapperBody": false,
                              "isFixedHeight": false,
                              "isFixedWidth": false,
                              "id": "u:cd86081f0234"
                            },
                            {
                              "type": "container",
                              "size": "xs",
                              "style": {
                                "position": "static",
                                "display": "block",
                                "flex": "1 1 auto",
                                "flexGrow": 0
                              },
                              "wrapperBody": false,
                              "isFixedHeight": false,
                              "isFixedWidth": false,
                              "id": "u:1f2934a2929c",
                              "body": [
                                {
                                  "type": "button",
                                  "label": "生成报告",
                                  "onEvent": {
                                    "click": {
                                      "actions": [
                                        {
                                          "componentId": "u:9652789981f2",
                                          "ignoreError": false,
                                          "actionType": "setValue",
                                          "args": {
                                            "value": "请基于我近30天健康数据，生成一份详细的健康报告。报告应包含但不限于以下几个部分：健康概况、关键指标分析、生活习惯建议、潜在健康风险及预防措施。请确保报告内容准确、客观，并附上改善建议。"
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  "id": "u:78933d01f660",
                                  "level": "enhance"
                                }
                              ]
                            }
                          ],
                          "style": {
                            "position": "relative",
                            "inset": "auto",
                            "flexWrap": "nowrap",
                            "justifyContent": "flex-start"
                          },
                          "id": "u:b8fac07a1423",
                          "isFixedHeight": false,
                          "isFixedWidth": false
                        }
                      ],
                      "size": "xs",
                      "style": {
                        "position": "static",
                        "display": "block",
                        "flex": "1 1 auto",
                        "flexGrow": 1,
                        "flexBasis": "auto"
                      },
                      "wrapperBody": false,
                      "isFixedHeight": false,
                      "isFixedWidth": false,
                      "id": "u:f631b031932d"
                    },
                    {
                      "type": "container",
                      "body": [
                        {
                          "type": "flex",
                          "className": "p-1",
                          "items": [
                            {
                              "type": "container",
                              "body": [
                                {
                                  "type": "button",
                                  "label": "发送",
                                  "onEvent": {
                                    "click": {
                                      "actions": [
                                        {
                                          "actionType": "submit",
                                          "componentId": "u:2978fcc63c06",
                                          "outputVar": "submitResult"
                                        },
                                        {
                                          "componentId": "u:7daa8263c93c",
                                          "ignoreError": false,
                                          "actionType": "setValue",
                                          "args": {
                                            "value": {
                                              "qa_id": "${event.data.submitResult.responseData.qa_id}"
                                            }
                                          },
                                          "expression": "${event.data.submitResult}"
                                        },
                                        {
                                          "actionType": "link",
                                          "args": {
                                            "link": "./${event.data.submitResult.responseData.qa_id}",
                                          },
                                          "expression": "${event.data.submitResult}"
                                        }
                                      ]
                                    }
                                  },
                                  "level": "primary",
                                  "id": "u:9bd2f76f146f"
                                }
                              ],
                              "size": "xs",
                              "style": {
                                "position": "static",
                                "display": "block",
                                "flex": "1 1 auto",
                                "flexGrow": 0
                              },
                              "wrapperBody": false,
                              "isFixedHeight": false,
                              "isFixedWidth": false,
                              "id": "u:565999a48877"
                            },
                            {
                              "type": "container",
                              "body": [
                                {
                                  "type": "button",
                                  "label": "清除",
                                  "onEvent": {
                                    "click": {
                                      "actions": [
                                        {
                                          "actionType": "cancel",
                                          "componentId": "u:b57468da8820"
                                        }
                                      ]
                                    }
                                  },
                                  "level": "default",
                                  "id": "u:ccb71b512baa"
                                }
                              ],
                              "size": "xs",
                              "style": {
                                "position": "static",
                                "display": "block",
                                "flex": "1 1 auto",
                                "flexGrow": 0
                              },
                              "wrapperBody": false,
                              "isFixedHeight": false,
                              "isFixedWidth": false,
                              "id": "u:66efef7eb3c4"
                            }
                          ],
                          "style": {
                            "position": "relative",
                            "inset": "auto",
                            "flexWrap": "nowrap",
                            "justifyContent": "flex-start",
                            "flexDirection": "row-reverse"
                          },
                          "id": "u:fc4e4d742152",
                          "isFixedHeight": false,
                          "isFixedWidth": false
                        }
                      ],
                      "size": "xs",
                      "style": {
                        "position": "static",
                        "display": "block",
                        "flex": "1 1 auto",
                        "flexGrow": 1,
                        "flexBasis": "auto"
                      },
                      "wrapperBody": false,
                      "isFixedHeight": false,
                      "isFixedWidth": false,
                      "id": "u:5bc78b2bfcbc"
                    }
                  ],
                  "style": {
                    "position": "relative"
                  },
                  "id": "u:da5a5936a822"
                }
              ],
              "resetAfterSubmit": true,
              "canAccessSuperData": true,
              "loadingConfig": {
                "show": true
              },
              "autoFocus": false
            }
          ],
          "size": "xs",
          "style": {
            "position": "static",
            "display": "block",
            "flex": "1 1 auto",
            "flexGrow": 0
          },
          "wrapperBody": false,
          "isFixedHeight": false,
          "isFixedWidth": false,
          "id": "u:459fb090dcb3",
          "themeCss": {
            "baseControlClassName": {
              "border:default": {
                "top-border-style": "var(--borders-style-1)",
                "left-border-style": "var(--borders-style-1)",
                "right-border-style": "var(--borders-style-1)",
                "bottom-border-style": "var(--borders-style-1)"
              }
            }
          }
        },
        {
          "type": "service",
          "api": "/mydoctor/api/getqa/${qa_id}",
          "interval": 2000,
          "stopAutoRefreshWhen": "${!autorefresh}",
          "body": {
            "type": "container",
            "body": [
              {
                "type": "flex",
                "className": "p-1",
                "items": [
                  {
                    "type": "container",
                    "body": [
                      {
                        "type": "flex",
                        "className": "p-1",
                        "items": [
                          {
                            "type": "container",
                            "body": [
                              {
                                "type": "avatar",
                                "showtype": "image",
                                "icon": "",
                                "fit": "cover",
                                "style": {
                                  "width": 40,
                                  "height": 40,
                                  "borderRadius": 20
                                },
                                "id": "u:cb0f0f786e0f",
                                "src": "/static/assets/images/user.png"
                              }
                            ],
                            "size": "xs",
                            "style": {
                              "position": "static",
                              "display": "block",
                              "flex": "1 1 auto",
                              "flexGrow": 0
                            },
                            "wrapperBody": false,
                            "isFixedHeight": false,
                            "isFixedWidth": false,
                            "id": "u:e513ce9fb23f",
                            "themeCss": {
                              "baseControlClassName": {
                                "padding-and-margin:default": {
                                  "marginTop": "var(--sizes-size-6)"
                                }
                              }
                            }
                          },
                          {
                            "type": "container",
                            "body": [
                              {
                                "type": "markdown",
                                "value": "${question}",
                                "id": "u:4492294bfb9f"
                              }
                            ],
                            "size": "xs",
                            "style": {
                              "position": "static",
                              "display": "block",
                              "flex": "1 1 auto",
                              "flexGrow": 1,
                              "overflowY": "scroll",
                              "height": "150px"
                            },
                            "wrapperBody": false,
                            "isFixedHeight": true,
                            "isFixedWidth": false,
                            "id": "u:fa072f04a655"
                          }
                        ],
                        "style": {
                          "position": "relative",
                          "inset": "auto",
                          "flexWrap": "nowrap",
                          "alignItems": "flex-start"
                        },
                        "id": "u:8f1110e78f92",
                        "isFixedHeight": false,
                        "isFixedWidth": false
                      }
                    ],
                    "size": "xs",
                    "style": {
                      "position": "static",
                      "display": "block",
                      "flex": "1 1 auto",
                      "flexGrow": 1
                    },
                    "wrapperBody": false,
                    "isFixedHeight": false,
                    "isFixedWidth": false,
                    "id": "u:e0c0f5813a2a",
                    "themeCss": {
                      "baseControlClassName": {
                        "radius:default": {
                          "top-left-border-radius": "var(--borders-radius-3)",
                          "top-right-border-radius": "var(--borders-radius-3)",
                          "bottom-left-border-radius": "var(--borders-radius-3)",
                          "bottom-right-border-radius": "var(--borders-radius-3)"
                        },
                        "border:default": {
                          "top-border-width": "var(--borders-width-2)",
                          "left-border-width": "var(--borders-width-2)",
                          "right-border-width": "var(--borders-width-2)",
                          "bottom-border-width": "var(--borders-width-2)",
                          "top-border-color": "var(--colors-neutral-line-8)",
                          "left-border-color": "var(--colors-neutral-line-8)",
                          "right-border-color": "var(--colors-neutral-line-8)",
                          "bottom-border-color": "var(--colors-neutral-line-8)",
                          "top-border-style": "var(--borders-style-2)",
                          "left-border-style": "var(--borders-style-2)",
                          "right-border-style": "var(--borders-style-2)",
                          "bottom-border-style": "var(--borders-style-2)"
                        },
                        "padding-and-margin:default": {
                          "paddingTop": "var(--sizes-size-4)",
                          "paddingRight": "var(--sizes-size-4)",
                          "paddingBottom": "var(--sizes-size-4)",
                          "paddingLeft": "var(--sizes-size-4)"
                        }
                      }
                    }
                  },
                  {
                    "type": "container",
                    "body": [
                      {
                        "type": "flex",
                        "className": "p-1",
                        "items": [
                          {
                            "type": "container",
                            "body": [
                              {
                                "type": "avatar",
                                "showtype": "image",
                                "icon": "",
                                "fit": "cover",
                                "style": {
                                  "width": 40,
                                  "height": 40,
                                  "borderRadius": 20
                                },
                                "id": "u:876ed69c2286",
                                "src": "/static/assets/images/agent.jpg"
                              }
                            ],
                            "size": "xs",
                            "style": {
                              "position": "static",
                              "display": "block",
                              "flex": "1 1 auto",
                              "flexGrow": 0
                            },
                            "wrapperBody": false,
                            "isFixedHeight": false,
                            "isFixedWidth": false,
                            "id": "u:c5ba39effa49",
                            "themeCss": {
                              "baseControlClassName": {
                                "padding-and-margin:default": {
                                  "marginTop": "var(--sizes-size-10)"
                                }
                              }
                            }
                          },
                          {
                            "type": "container",
                            "body": [
                              {
                                "type": "markdown",
                                "value": "${answer}",
                                "id": "u:89bc1a065067"
                              }
                            ],
                            "size": "xs",
                            "style": {
                              "position": "static",
                              "display": "block",
                              "flex": "1 1 auto",
                              "flexGrow": 1,
                              "overflowY": "scroll",
                              "height": "250px"
                            },
                            "wrapperBody": false,
                            "isFixedHeight": true,
                            "isFixedWidth": false,
                            "id": "u:db3f6161e026"
                          }
                        ],
                        "style": {
                          "position": "relative",
                          "inset": "auto",
                          "flexWrap": "nowrap",
                          "alignItems": "flex-start"
                        },
                        "id": "u:9888e8a05804",
                        "isFixedHeight": false,
                        "isFixedWidth": false
                      }
                    ],
                    "size": "xs",
                    "style": {
                      "position": "static",
                      "display": "block",
                      "flex": "1 1 auto",
                      "flexGrow": 1
                    },
                    "wrapperBody": false,
                    "isFixedHeight": false,
                    "isFixedWidth": false,
                    "id": "u:59edd47cea37",
                    "themeCss": {
                      "baseControlClassName": {
                        "radius:default": {
                          "top-left-border-radius": "var(--borders-radius-3)",
                          "top-right-border-radius": "var(--borders-radius-3)",
                          "bottom-left-border-radius": "var(--borders-radius-3)",
                          "bottom-right-border-radius": "var(--borders-radius-3)"
                        },
                        "border:default": {
                          "top-border-width": "var(--borders-width-2)",
                          "left-border-width": "var(--borders-width-2)",
                          "right-border-width": "var(--borders-width-2)",
                          "bottom-border-width": "var(--borders-width-2)",
                          "top-border-color": "var(--colors-neutral-line-8)",
                          "left-border-color": "var(--colors-neutral-line-8)",
                          "right-border-color": "var(--colors-neutral-line-8)",
                          "bottom-border-color": "var(--colors-neutral-line-8)",
                          "top-border-style": "var(--borders-style-2)",
                          "left-border-style": "var(--borders-style-2)",
                          "right-border-style": "var(--borders-style-2)",
                          "bottom-border-style": "var(--borders-style-2)"
                        },
                        "padding-and-margin:default": {
                          "paddingTop": "var(--sizes-size-4)",
                          "paddingRight": "var(--sizes-size-4)",
                          "paddingBottom": "var(--sizes-size-4)",
                          "paddingLeft": "var(--sizes-size-4)"
                        }
                      }
                    }
                  }
                ],
                "style": {
                  "position": "relative",
                  "inset": "auto",
                  "flexWrap": "nowrap",
                  "flexDirection": "column"
                },
                "id": "u:69ffa5dae925",
                "isFixedHeight": false,
                "isFixedWidth": false
              }
            ],
            "size": "xs",
            "style": {
              "position": "static",
              "display": "block",
              "flex": "1 1 auto",
              "flexGrow": 1
            },
            "wrapperBody": false,
            "isFixedHeight": false,
            "isFixedWidth": false,
            "id": "u:3672c3d110b7",
            "themeCss": {
              "baseControlClassName": {
                "border:default": {
                  "top-border-style": "var(--borders-style-1)",
                  "left-border-style": "var(--borders-style-1)",
                  "right-border-style": "var(--borders-style-1)",
                  "bottom-border-style": "var(--borders-style-1)"
                }
              }
            }
          }
        }
      ],
      "style": {
        "position": "relative",
        "inset": "auto",
        "flexWrap": "nowrap",
        "flexDirection": "column-reverse",
        "minHeight": "100%"
      },
      "id": "u:0d50face4b4c",
      "isFixedHeight": false,
      "isFixedWidth": false
    }
  ],
  "id": "u:7daa8263c93c",
  "asideResizor": false,
  "pullRefresh": {
    "disabled": true
  },
  "regions": [
    "body",
    "header",
    "toolbar"
  ],
  "toolbar": [
    {
      "type": "nav",
      "stacked": false,
      "popupClassName": "app-popover :AMISCSSWrapper",
      "links": [
        {
          "label": "健康数据大屏",
          "to": "/mydoctor/data/",
          "target": "_self",
          "id": "0",
          "children": []
        },
        {
          "label": "智能家庭医生",
          "to": "/mydoctor/chat/",
          "target": "_self",
          "id": "1",
          "children": []
        }
      ],
      "id": "u:6f7bb723a75b"
    }
  ],
  "data": {
    "qa_id": "{{ qa_id }}",
    "question": "",
    "answer": ""
  }
}
{% endblock %}